<?php


namespace Tbf\Bundle\TbfBundle\Service;


class Mailer {
    protected $origin_mailer;
    protected $default_sender;
    function __construct(\Swift_Mailer $mailer,$default_sender){
        $this->origin_mailer = $mailer;
        $this->default_sender = $default_sender;
    }
    function send(\Swift_Mime_Message $message){
        return $this->origin_mailer->send($message);
    }
    function sendNoSender(\Swift_Mime_Message $message){
        $message->setSender($this->default_sender);
        return $this->origin_mailer->send($message);

    }
}